He resigned under opposition, but was renominated in 1837