fixed a bug of callfunc