Fixed bugs in nose tests.