Assorted Bugfixes