Match the spec properly

Fixes #1 and #2.
Whoops – fixed :)