fix elif in printlist logic bug