Match the spec properly

Fixes #1 and #2.
Are the tests ever run across realms?