fixed bug in posts.php