more minor bug fixes