Fix null replacement