Fixed problem with getState