Fixed issues reported by winapi_check.