minor bug fixes, patches
more bug fixes