We study an Immirzi-like ambiguity in three-dimensional quantum gravity. It shares some features with the Immirzi parameter of four-dimensional loop quantum gravity: it does not affect the equations of motion, but modifies the Poisson brackets and the constraint algebra at the canonical level. We focus on the length operator and show how to define it through non-commuting fluxes. We compute its spectrum and show the effect of this Immirzi-like ambiguity. Finally, we extend these considerations to 4d gravity and show how the different topological modifications of the action affect the canonical structure of loop quantum gravity.