Program now handles invalid commands.