Fix segfault when inputmode has no args