fixed can't dup nilClass issue