Minor changes

Fixed sql handler