replaced 0 with null on some places