Fix reported bug with empty list