Fix some problems in proxy