Fix external server not working in some situations