massive fixes in websql implementation