Bugfixes in unittests that should fix Ruby 1.9 tests.