fix a bug  and and OS Type
avoid warning