fix scope and required files