fixed orderbook to prioritize earlier windows instead of later ones