Fix plugin functions