bug fixes
some fixes