Another potential segfault fixed. Thanks RDB :-)