fixed undefined startdate causing error and falsy 0