Bug fixes
Bug fixing in tests