fix a bug which call funciton form non-object