Fixed failures in tests