bug fixes and minor new features