fix for poorly scaling images