fixed crashes (nw)