fixed another possible segfault