Corrected bugs for states in movable and the bitmask to string.