Fixing toJS opt