Fixed the looping bug for the 404 page as well.