fixes for scaling