Toby's fix to wp-java.