Fix start and end of fetch test for cases step != 1.

This is a temporary fix.
We must get the start and end of date range in a more proper way.
I will try again later.