Fix for checking notification message before page is loaded

LGTM