fix some issue revaled by basic demo