some fix

fix for windows,add attributes etc.