Fix setup: reference management