change -1 to 0 as empty value