fix instance hours index, avoid negative results