fixed issues #16 and #20. Now the plugin is only active if the correct layer types are loaded in the map canvas.