MPs approved the Universal Credit and Personal Independence Payment Bill but only after ministers made big changes.