Fix plugin not working properly