fix the error in compile mode