fix for scaling images