fix minimumScale calculation