Fixed Linux compatibility issue

Fixed the code as the title suggests. Please test under windows.