bug in dispatching mouse button events