fixed some stuff, made SetValue after rangebound in NewLibs conditional on ne-ns >= 1, so that no NULL pointer runtime error occurs