bug fixes in edit_post.php