Fix plugin initialization bugg