fixed one segfault, trying to fix problem with togglemark