Fix exception when proxy=nil