fix too hastily implemented Java API
version 0.1.4