Fix a bug that wrong type is used

It is enbugged by :patterns -> :pattern change. Sorry...