[misc] Bulletproofing

(cherry picked from commit 226e652a4a978238c5f5335a6054e510e00e1e8a)