Fix null path issues