bugfix for scaling