Fix constant assignment

Closes #1