Set the enddate for the right entity.

Fixes #7