fixes in scaling