Fixed issues with image sizes not being correctly adjusted.