fix comparison with boolean instead of tinyint