fixing up the dialogue box to clear values