various bug fixes
various bug fixes 2