Fixed # of available APIs check and error message when service is unavailable