fix degenerate case