Fixed bug when reloading node-red.