bug fix: works on non-lossy. Was changing memory while iterating through the list.