autoinit fix in samples