fixes a bug in 404 and other pages