fixed a test. also fixed several bugs in the backend code in the previous commit.