fix for getState does not return a promise