some more bug fixes

some more bug fixes