Fixed a bug with reading the ip