fixed image scaling bug