Fixes template format to handle line_number properly if its None