Add missing part from commit b4604d2833372fcbd6cffe4018d8e3cc98f6ae33