Fixed bug in collapse references.