remove trailing spaces, correct typo & change to author's custom sanitize_boolean()