prepared SQL... fixes