Implementation of request #3

Hi Denis
I'm no real developer and your code is too difficult for me to read in details ;) 
Yet it seems that the couple of added lines does the job all the same :)
Feel free to test&use it as you wish.
Thanks
Olivier