fixed scaling bug