Synced with toxcore API changes