Fixed bug with deletion