Finalizes fix from c2c2cc2c5df228fabcc534b701ec3664edeaf278