fix a bug where right click generates a move