As i suggest on IRC, here's the patch.