Fixed group/post pull logic and database bugs