Fix bugs after repository transfering