Fixes for compatibility with Java 1.3