Needed to put the warning suppression on the function line instead the statement where the delete takes place