Fix 'cant dup on nil' error