Fixes #20 again after huge refactor