Fixed serious performance issue.