bugfix: cycles on invalid file