Merge pull request #151 from zivchang/next

[bug fix] PTSDK-1166
[bug fix] PTSDK-1166

fix some missing code