Fixed bug with date ie index shifting