Fixed rare crash during engine disposing.