fix bug for proxy function