Bugfix/setval checkbox

Adds tests for and fixes bug #57