Fix string indexing bug in ReqState.java