fix an "innerHTML is null" error