fixed android build and errors found during fixing