SQL: Fix sql fail (thx Sar777)