Fixed circular dependency issue in posts helper