Small bug fix - was returning the wrong state.