Rewrote check zero patterns