Fixing ip parsing bug