Fix datedelta bug