making mode9 safer