Synced to upstream revision 1.150