v3.17 minor logic improvement