Revert 8b790a93efc1ac334138274b8da69f0b82fb32c8 and fix #10