Fix up a few more bugs