fixed the click event so that it would go the right distance away