refactor broke debugjs option, fixed