a little more checking for unclosed lists