Fixes to the 4.0 version of the plugin.