fix modular scale bug