sync to https://github.com/q-gears/q-gears/commit/0edf7e2183c8998bac1f723da60aced647933451