Fixing the marker click issue if index is 1