Fix StackOverflow caused by drain