Fix #2—Implement setting cancelButtonIndex