backportet jython fixes