fix a bug: use the func in args instead of calling func directly