fixed infinite loop on error404