Fixed a bug introduced by visual diffs. Some internal refact.