Fixed undefined variable $delete.