Fixed bug about counting arguments in patterns.