More plugin state fixes, closes #59