fixed autonumbering with empty pattern