plugins: fix state loading