That... is not a bug, it is a feature.
Seriously, it is supposed to be like that. You solve it by reattempting the previous room and then coming back with the correct rotation. You can do that by using the button on the top-right.