Fixed bugs with cancel/confirm buttson