improvements, finish receive when closing dialog