Fix api key substitution