fix typos

In the second block, only 'patterm' was changed to 'pattern'