Fixed segfaulting problem.