Fixed an sql parser issue in utils refresh
need to update the other functions to sanitize input as well