fix single.php bugs