Fixed problem where it was possilble to not read a command but still attempt a look up