FIX: Ensure that index is frames before computing MSD.