fixed a segfault that Maria reported :)