Fixed issue with errors on page reload