add missing check for #4899