fix address sanitizer error