Update lib.functions.php