fix response sending in endpoint replace operation