Fixing problems with tests