Maybe this will fix the external ref problem?