fixed smart check
(cherry picked from commit d5dbd32)
Merge remote-tracking branch 'origin/139' into 139