Fixed a segfault in the code.