Misc minor changes/bug fixes