Fixed some boolean checks