fix rebuilding