Fixes to prevent errors on loading main page