Fix remove_buff segfault