Added some control to errors of 404 code