fixed a bug in post deletion