fix error on rebuild