Fixed diagonal indexes issue.