break loop in ghost if openlist is empty