#468 add defensive check