Make cancel button disabled in the correct states.