Made some fixes for android, etc.