[master] Two patches helping with threading a bit