fixes some crossplatform issues