Modified core.php