Fixed unit tests

- Added some safety around getting the builder
Merge branch 'testfixes' into staging