avoid calling client callback twice