Fix compilation errors in Listener.java