Fix plugin for 1.7.x