Added custom 404, fixed history sort