Hopefully removed nullpointer crash

The crash was introduces when starting to use global variable
lastActionState