Minor bug fixes / clean up