fixed bug with date rebasing