added unbind to click functions to prevent the click even firing twice