fixing bug in improper handling of NEEDSOMETHING state