Fixed incorrect handling of nested list.