fix several small bugs in backend and test helper classes