Fix for image rotation.

It's not perfect (ideally it would run on the standard image), but it's
been causing a lot of issues, so this will do for now.