Fixed minor bugg in example program