before rebuilding models