Minor bug fixes 2