Bugfix assorted issues