fix updated IP condition