Fixes typo with sql query.