Fixed unstablility and added dialog box upon click confirm from diet
page