Fix error headers always being 404