Added bool field and simplified the logic of raw setting