fix to sql command