Fix a couple bugs, still need list_remove_if