fixed bug in deleting sequence