windows type mismatch warning fixes