Fix 'cant dup on nil' error
Merge pull request #1 from BastienDuplessier/master

Fix error (Thanks to Zangther @BastienDuplessier)