database bug with adding a post