Fixed exceptions that prevent running this app with recent JVMs.