Fix possible exception when retrieving reminder

Fixes #2647
Fixes #2648