bug fixes 2 & misc