Fix 0 being inserted for nil values