some fixes in the refactored code for unity android