Fix bug in list creation