fixed bug in fetch from server js