Bugfixes to get the ANT build working