Add missing check from original implementation