Fixed bug that caused the ambience to be corrupted by gc.