fix data should be allocate when render is not nil