fix bug in dialog call