fixed bug for fetch