Fixed some bugs on the cursor creation where hour boundaries weren't working primarily