Fixed error with fetch API.