made plugin calls conditional to plugin existing