If you don't mind I will pull the master branch patch to staging-yami and then rework this patch.  If you find a problem with it, please submit a new patch