Added rebuild option.