neil picked from commit c0b550a753a9f533e0b69404a8915ace913ffb2e