Fixed reference error when adding cues.