WIP - fix dangling ref