fix scaling problems