Make sure the state exists in RunHistory
Render templates with alert's time, not now

fixes #395