small bug fixes and feature additions