updated nucommon.php more changes for safephp