bug fix for afterUIEvent ..