fixes null in outputted files