Added delete frames of delete, and fixed some bugs