fixing the click bug