fix smart matrix example