fix scope difference bug