fix undefined notice