Image resize bugfix