Corrected issue with where logic in update_statement