fix scope error