Fixed a proper but not fully tested implementation of boolean tests.
Fixed chain order bug in setElementText