Fix build errors

I used ant to build and detected some errors. This requests contains the fixes I did to get it working.