small fixes to lib_ne.php