ari more bug fixes