Fix CodeSent error

Fixes #45