Fixed php bug in functions.php and header.php