Fix bug in editing/deleting posts