ChartID() Doesn't Return A Value

 
Hey coders, This seems to be a bug but I wonder if it can survive this long

Check out the following code. It is meant to print the symbol names of the current and next chart.
   long id=ChartID();
   long idnext = ChartNext(id);
   string idname= ChartSymbol(id);
   string idnamenext= ChartSymbol(idnext);
   Print("Current chart is ",idname,". Next chart is ",idnamenext);
The Result
2020.07.16 15:21:05.549 Test GBPJPY,M1: Current chart is GBPJPY. Next chart is 





So I thought something is wrong with my code, I printed this

printf("Going Next: ", string(ChartID()));

The Result

2020.07.16 15:26:40.490 Test GBPJPY,M1: Going Next: 




Something is clearly wrong here. If you have encountered this already please share your solution

 


After several attempts, I restarted my MT4 and it worked.