a few bug fixes and updates