fixed missing having segment