Bugfix image rotate method