fixed warning about unsafe use of bool in bit shift.