fixed the duplicate post bug