Fix bug caused by mouse middle button. Close #15.