fixes a bug in move_posts