Fix segfault in stop