Fix segfault, but linear heur still broken