error in line 247 function.php