fix error when right clicking before selecting