fix small bugs that crept in with new functionality