fix scaling and remove some debug prints