Fixes some java warnings.