fixed bug in plugin registration