Fixed an occuring exception when dragging with right mouse button