misc updates and bugfixes