Don't read one command past the end.