Fix minor bug when deleting posts