FIX for #1176, #1178, #1173, #1169

And small fix for old list.php