properly cast from int to bool