Case sensitive query was causing issues