fix scope issue in example app