Fixed some warnigs..

the windows code needs to be tested!