A few more fixes to the plugin. Now everything works as expected