Fix wrong logic
Merge branch '2.0.x' into 2.0.x-deprecated