fixed getting ip

Change-Id: I8c4476e094ba3a7e983179a136e79e4a50ffd4d4