fixing loose-ends as pointed out by Jesse