Begin attempts to solve NullPointerException when a command is executed.