solved bug with mouse events