fixing detail.php