fixed bugs in sequence control