Acting unpredictably due to image sizes