Free space fix (from the upstream 0.17.2)