The influence of fluctuations on the incommensurate-commensurate transition