bug fixes

minor bug fixes