fix empty sql execution error