fixes Cannot call method 'split' of null error