Changed same function as in prev commit.