Fixed sharedposts mode and while loop.