Update corefunctions.php