fix scoping issue with modal confirm and cancel