Fixed retreival of command details and executing command.