Fix get last reference image