Fix list()

Fixes the list() function and addes test for it.