fixed logic error in proxy implementation