some cleanups of purchase dialog