avoid undefined error