Make guard check in state machine itself