Small fixes to Thrust 5