Minor changes

to the sql handler