Update click logic to prevent clicking on already clicked on boxes