Fixed a bug where 0 was being converted to null