Fixed bug in statemachine, weak wildcard

Before wildcards would take precedence over other transitions
which is not expected behavior, now this will no longer occur.