Actually this is a better fix than the previous commit.