fix bug in modular scale code output