added a fix for some type conversion errors in wondows