some fixes, java jar is somehow broken though