bug fixes

bug fixes after my last change