fixing conditions in db_update
lugg-117