Fixed most windows errors