Fix image indexation bug.