fix errors on loading