moved the 'ip_only' handling to the right place