fixed bug when the file is loaded before the plugin is loaded