Fixed scaling bug