fixed segfault in the destructor of the scanner dialog