Fix register error

Fixes #18