Fixed plugin loop