Fixed image rotation bug. Resolves #18