Fixes an issue with the java->python port