two minor bug fixes