bugfix: misc fixes