Fixed API key reading from envvar