fix tests (sql query and wrong value)