Moved the IP4 check before the IP6 ;)