yet another fix in the sql command