Fixing delete_post hook