更加健壮
Made the code more robust.