sync
fix related to 6a1d91dc76ec819e85b180b8cdaf40ddd639a538
Backported #638 from unstable