bugfix

closes #310
closes #302