Fixes for functions.php