Fixed bug with post generation