Fix small bug in fetch API call