Made character based API requests more robust