better initialization and no-gateway = -1
merge in develop branch