fixed bad malloc size