fix scope for listeners