Fix parsing patterns