fixes to make work with windows