Fixing related posts functionality

This is a fix for #9