fixing double callback invoke in client