Fixed bug in setting default wrap state