Fix pattern name bug