Fixed chain crash problem if user added whole url instead of just api key