minor bug fixes

minor bug fixes