Fix possible exception when retrieving reminder

Fixes #2678