Oops, the previous patch was applied on top on another one I have here. This one's better.