events scope bugfix