fix ending duration