fix generate rack bug