Fixed deletion errors