fix isComplete function
Merge branch '1.x' into 2.x