fix ptr reference