minor bug fixes and adjustments