fix bug when visiting invalid item or listing
merge