Fix comparison boolean type issue