Update functions.lib.php