minor bug fixes
a few changes