new test for basic values, fix a couple bugs found