Bug fixes in posts structure function.