Fixed few bugs in plugins