Default to zero with invalid values