Cancel button not getting added as an action