dvr: some fixes from kendrak24 for my changes to PR #284