fixed non-blocking problem with nxtval counter