keying fragments correctly