fixed constructor bug in plugin