[BUGFIX] Error 500 instead of 404 on faulty links

Thanks Bastian for the hint!