Fixed object undefined && stack undefined problems