fix the getState missing