fix the condition in following sub-states