Fix the "object turns black" bug.