Mechanism to lock the height