Fixed the logic order of checking precondition states and create effect states.