Bugfix

Fixed issues created during refactor