FIX issue #264

This fix complements the issue @barraudf on #269 

Please see the code. This works on pelican==3.3 and 3.4.

Thanks you.