(Hopefully) fixed crashing by getting rid of call to delete.