Fixed bug in list_remove_if()