Fixed delete_key bug in publishing