quick fix to prevent app from crashing if terminate during delete