Bug/#94

Resolves issue #94 and issue #164