fix bug in handle_animals