fixes #5168 prevent undefined notice message