few bugs fixed for bool checks