Patch applied as 542b18709a46e361de8f25e3fece29860532743c with a few modifications. Thanks.