Bad argument exception in collections/List.remove()