fixed some things that didn't work on linux gcc, hope this works on windows too still