Fix the invalid object compile error for sim