patches from master