Fixed missing analysis ref and added test