fixes on android side, still bugs with threads