Fixing some bugs and making the plug-in compatible with Java 1.4