Sorry for sending previous patch too late.<br>Here's a version rebased on latest git master.<br>