Minor changes for scaling images