Fixed hb-with related memory leak