Fix for list iteration