Revert part of 559ca8ed3 which introduce a bug.