switch from deleteLater() to delete