Fix issues with tests