Fixes pattern function namespace, uses classes_array instead of string