minor bug fixes