Fixed issue with buttons still being enabled on cancel