fixed a bug in getting ip address from the tag