Fixed render_template Error when getting 404 page