Fix #611

this killed the scope of "this" in event functions