Don't use an anonymous function to trigger admin notices

Fixes #528 

@Japh please review