nathan's fix for locked references