updated single.php to work with PHP<5.4