Fixed broken previous post function