bug fixes and test updates
fixes, and working up tests