resolved stack bug so that stack always returns something