Fix for unsupported weak reference problem