fix a couple of value equation bugs