fix class cast exception (on reading setting)