Fixing a bug in mail if deleting first element