path has some nil values put into it, added a check for nil, need to fix