Fixed error in delete peer method.