Delegation Changes

- Fix to prevent adding cancelbutton when passed as null while using
delegation pattern