bug fix and optional cutting date