Bug fix dealing with double clicks