Update lib.php