fix logic that checks existance of plugin coderef