optimize for linux , and bug fixed.