The way it did it here was weird and i think it caused the bug because it would check the ask time + 600 and that would wrap around. I don't know for sure if that's the cause of the bug, but this is an improvement none the less.