fix scope generator