Fixed validation of command sequence