some misc updates and bugfixes