Patch pushed as b999ce74baced2f729fd97f9df76d622ff47d6c8 with some modifications. Thanks.