Fix (some) failing specs

this won't fix all of the failing specs, but it should fix all except for the generator ones.

The generator specs are failing due to a state problem introduced by #298. I will create separate ticket and pull request to fix these problems.