use 0 instead of null for empty attributes