fixed a few issues on events