Adds eq-builder related bug fixes from apangea

relevant commits were: (again, from apangea repo)

e167e654845634044f6eb30c70e3c80ae789a111
ded74623736cfd9ed1dcdc270dd6686ca805ad05
d39e0c941d61e46afecd4ee34ce0a964f00b116d