Integrate the repeated code of previous commit.