Fixing issues with tests