Fixing cell detection on click