If this is expecting a boolean why is this cast to an INT?