Bulletproofing.
(cherry picked from commit c29541c21e726f7b59e93e8da4b3f898aba3087e)