fixed 404 handling for folders