Changes from commit 7eecef982c5d458a22d8c9c3b870743edfc5ba76