Fixed initialization for sample application.