Certain bugs popped up when deallocating

Had to remove free(command) and free(shortPath) because they bugged out
rather hard.