Fixed crash on garbage code #6106