library ref fix