Fixed daterange bug