fixed related posts loop and reset