update to_bool
head&body end tag: handle the case with spaces