improved last resort to go for gateways first