fixed some stuff
Merge pull request #95 from wriley/rzrsqlpatch

fixed some stuff with new sql