Add <Nak> test scripts, now fix the statemachine for <Nak> support