Fix for asynchronous state access in SSVEP application.  It can't be done asynchronously, so I moved the place where the state is saved (by duplicating an if statement).