Tried to merge pull request #5 and pull request #6 from razorsedge. Unfortunatelly do not have opportunity to test it now. I hope it will work.