some fixes and minor suggestions