Update functions.php

minor bugs