fix bug on swap class in proxy