Fix up a few small mysql related errors