Gallery resize fixed width/height bugfix