fixed bug when clicking outside board