fixed win7 and linux bugs