fixes off-by-one and testing issue discussed in 889
add timing debug info