bar bugfix ( get bar number at current time  )