avoid infinite promise