Fix for format when some elements are null.