cast boolean fields correctly