fix react seq order and validate input