A few misc bug fixes

@jdoconnor