handle case where ajax response is a string