fix scope bug in previous commit