Fixes bug on more recent perl's versions