fixed bug for the offline mode call