fix uncaught TypeError

making sure that the terminal is initialized before running
resizeTerminal within fontLoaded function