Fix segfault when p cmd is mistyped