Fix ip extraction